package com.hrt.test.db;

import java.util.Date;

import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;

public class CycledataModel extends BaseModel {

    private static final long serialVersionUID = 1L;

    private static String tableName = "CycleData";

    public static IField tm = new Field(CycledataModel.class, "TM", FieldType.DateTime, false);

    public static IField pollname = new Field(CycledataModel.class, "pollName", FieldType.String, false);

    public static IField meas = new Field(CycledataModel.class, "MEAS", FieldType.Double, false);

    public static IField status = new Field(CycledataModel.class, "STATUS", FieldType.String, false);

    public static IField createtime = new Field(CycledataModel.class, "CREATETIME", FieldType.DateTime, false);

    public static IField dataready = new Field(CycledataModel.class, "DATAREADY", FieldType.String, false);

    public static IField dataid = new Field(CycledataModel.class, "DATAID", FieldType.String, true);

    public void setTm(Date value) {
        setFieldValue(tm.getFieldName(), value);
    }

    public Date getTm() {
        Object value = getFieldValue(CycledataModel.tm.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public void setPollname(String value) {
        setFieldValue(pollname.getFieldName(), value);
    }

    public String getPollname() {
        Object value = getFieldValue(CycledataModel.pollname.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setMeas(Double value) {
        setFieldValue(meas.getFieldName(), value);
    }

    public Double getMeas() {
        Object value = getFieldValue(CycledataModel.meas.getFieldName());
        Double result = getValueConver().converToDouble(value);
        return result;
    }

    public void setStatus(String value) {
        setFieldValue(status.getFieldName(), value);
    }

    public String getStatus() {
        Object value = getFieldValue(CycledataModel.status.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setCreatetime(Date value) {
        setFieldValue(createtime.getFieldName(), value);
    }

    public Date getCreatetime() {
        Object value = getFieldValue(CycledataModel.createtime.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public void setDataready(String value) {
        setFieldValue(dataready.getFieldName(), value);
    }

    public String getDataready() {
        Object value = getFieldValue(CycledataModel.dataready.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDataid(String value) {
        setFieldValue(dataid.getFieldName(), value);
    }

    public String getDataid() {
        Object value = getFieldValue(CycledataModel.dataid.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public String getTableName() {
        return tableName;
    }

    public boolean isNeedCache() {
        return true;
    }

}